/*
 * EventReceiver.h
 *
 *  Created on: 24.12.2011
 *      Author: Caffeine
 */

#ifndef EVENTRECEIVER_H_
#define EVENTRECEIVER_H_

#include <irrlicht.h>

class CGameDevice;
class IGameObject;

#include "GUIEvent.h"

class EventReceiver: public irr::IEventReceiver{
private:
	irr::core::vector2di mouseOld;
	CGameDevice*gamedevice;
	IGameObject*gameObject;
	bool rady;
	irr::core::array<GUIEvent> gui_events;
public:
	irr::core::vector2di mouseFirstClick;
	irr::core::vector2di mouseNow;

	bool mouseLeftDown;
	EventReceiver(CGameDevice*gd);
	virtual bool OnEvent(const irr::SEvent& event);
	irr::core::vector2di getDeltaMouse();
	void addEvent(DYN_GUIEvent function,irr::gui::IGUIElement*caller,irr::gui::EGUI_EVENT_TYPE type);
	void refreshGameObject();
};



#endif /* EVENTRECEIVER_H_ */
